home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / exec / checkio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  1.5 KB  |  76 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: checkio.c,v 1.4 1996/08/13 13:55:59 digulla Exp $
  4.     $Log: checkio.c,v $
  5.     Revision 1.4  1996/08/13 13:55:59  digulla
  6.     Replaced __AROS_LA by __AROS_LHA
  7.     Replaced some __AROS_LH*I by __AROS_LH*
  8.     Sorted and added includes
  9.  
  10.     Revision 1.3  1996/08/01 17:41:07  digulla
  11.     Added standard header for all files
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include <exec/execbase.h>
  17. #include <exec/io.h>
  18. #include <aros/libcall.h>
  19.  
  20. /*****************************************************************************
  21.  
  22.     NAME */
  23.     #include <clib/exec_protos.h>
  24.  
  25.     __AROS_LH1I(struct IORequest *, CheckIO,
  26.  
  27. /*  SYNOPSIS */
  28.     __AROS_LHA(struct IORequest *, iORequest, A1),
  29.  
  30. /*  LOCATION */
  31.     struct ExecBase *, SysBase, 78, Exec)
  32.  
  33. /*  FUNCTION
  34.     Check if an I/O request is completed.
  35.  
  36.     INPUTS
  37.     iORequest - Pointer to iorequest structure.
  38.  
  39.     RESULT
  40.     Pointer to the iorequest structure or NULL if the device is still
  41.     at work.
  42.  
  43.     NOTES
  44.  
  45.     EXAMPLE
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.     OpenDevice(), CloseDevice(), DoIO(), SendIO(), AbortIO(), WaitIO()
  51.  
  52.     INTERNALS
  53.  
  54.     HISTORY
  55.  
  56. ******************************************************************************/
  57. {
  58.     __AROS_FUNC_INIT
  59.  
  60.     /*
  61.     The I/O request is still in use if it wasn't done quick
  62.     and isn't yet replied (ln_Type==NT_MESSAGE).
  63.     */
  64.     if(!(iORequest->io_Flags&IOF_QUICK)&&
  65.        iORequest->io_Message.mn_Node.ln_Type==NT_MESSAGE)
  66.  
  67.     /* Still in use */
  68.     return NULL;
  69.     else
  70.     /* done */
  71.     return iORequest;
  72.  
  73.     __AROS_FUNC_EXIT
  74. } /* CheckIO */
  75.  
  76.